<?php
/**
 * 施工控制测量成果表
 *@author ZhouYP 
 **/
namespace Admin\Controller;
use Common\Controller\AuditbaseController;
class ConstructionControlSurveyController extends AuditbaseController{
		public function _initialize() {
		parent::_initialize();
		$this->deal_model = D("Common/ConstructionControlSurvey");
		
		$this->check = array('code');
		// 当前审批流程
		$this->function = "quality";
		$this->subfunction = "5";
	}
	
	/**
     *  主页
     */
	public function index(){
		/**搜索条件**/
		$where = "d.is_deleted <> 1 ";		
		$this->indexAuditPage($where);
	}

	/**
     *  删除 
     */
	public function delete(){
	    $id = I('get.id', 0, 'intval');
		if(!$id){
			$this->error("请选择要删除的数据！");
		}
		$data = array(
			'id'	=> $id,
			'is_deleted' => 1
		);
		if ($this->deal_model->save($data) !== false) {
			$this->success("删除成功！");
		} else {
			$this->error("删除失败！");
		}
	}

	//分配权限页面
	public function distribution(){
		$level = $_GET['level'];
		//var_dump($level);
        $this->assign("level", $level);
        $this->distribution_base();
	}
}
?>